package com.jzo2o.customer.controller.agency;


import com.jzo2o.customer.model.domain.BankAccount;
import com.jzo2o.customer.model.dto.request.BankAccountUpsertReqDTO;
import com.jzo2o.customer.service.IBankAccountService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 银行账户信息表（服务人员/机构共用） 前端控制器
 * </p>
 *
 * @author author
 * @since 2025-07-02
 */
@RestController("agencyBankrekeningController")
@RequestMapping("/agency/bank-account")
@Api(tags = "服务端 - 银行账户相关接口")
public class BankAccountController {
    @Autowired
    private IBankAccountService bankAccountService;


    /**
     * 新增地址
     */
    @PostMapping
    @ApiOperation("新增或更新银行账号信息")
    public void addOrUpdate(@RequestBody BankAccountUpsertReqDTO dto) {
        bankAccountService.addOrUpdate(dto);
    }
    /**
     * 查询地址
     */
    @GetMapping("/currentUserBankAccount")
    @ApiOperation("查询地址")
    public BankAccount queryBankAccount() {
        return bankAccountService.queryBankAccount();
    }
}
